//
//  ViewController.m
//  iOSLensson1
//
//  Created by blue on 15-11-2.
//  Copyright (c) 2015年 HYD. All rights reserved.
//

#import "ViewController.h"
#import <QuartzCore.framework.h>

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    
    
    self.view.backgroundColor=[UIColor blueColor];
    
    UILabel * l=[[UILabel alloc]initWithFrame:CGRectMake(100, 200, 100, 44)];
    l.text=@"你好，世界!";
    l.textColor=[UIColor greenColor];
    [self.view addSubview:l];
    
    UIView * view =[[UIView alloc]initWithFrame:CGRectMake(100, 100, 100, 100)];
    view.backgroundColor=[UIColor blueColor];
    [self.view addSubview:l];
    
    for (int i=0; i<5; i++) {
        UIView * v =[[UIView alloc]initWithFrame:CGRectMake(20 + i*50 + i*8, 100, 50,50)];
        v.backgroundColor=[UIColor greenColor];
        //v.layer.cornerRadius=50/3.0;
        v.clipsToBounds=YES;
        [self.view addSubview:v];

    }
    
    UIView * line1=[[UIView alloc]initWithFrame:CGRectMake(100, 50, 3, 200)];
    line1.backgroundColor=[UIColor whiteColor];
    line1.clipsToBounds=YES;
    [self.view addSubview:line1];

}

UIView * view=[[UIView alloc]initWithFrame:CGRectMake(20, 200, 200, 200)];
view.layer.borderWidth=2;
view.clipsToBounds=YES;
[self.view addSubview:view];
UIView * yuan=[[UIView alloc]initWithFrame:CGRectMake(100, 0, 200, 200)];
yuan.layer.cornerRadius=100;
yuan.layer.borderWidth=2;
[view addSubview:yuan];

UIView * line1=[[UIView alloc]initWithFrame:CGRectMake(0, 99,200, 2)];
line1.backgroundColor=[UIColor whiteColor];
line1.clipsToBounds=YES;
[self.view addSubview:line1];

UIView * line2=[[UIView alloc]initWithFrame:CGRectMake(99, 0,2, 200)];
line2.backgroundColor=[UIColor whiteColor];
line2,clipsToBounds=YES;
[self.view addSubview:line2];




- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
